import React,{memo,useEffect,useState} from 'react'
import styles from '../../../../styles/Home/Context.module.scss'
import Swiper from './swiper/Swiper'
import axios from "../../../../axios/axios"
import Classification from './classification/Classification'
import Zu from './zu/Zu'
import Housing from './housing/Housing'
import Roomname from '../../routing/rentlist/home-rentlist/Roomname'


const Context = () => {

    let [swiperData,setSwiperData] = useState([]);//轮播图的数据
    // https://www.linweiqin.cn/api/public/v1/home/swiperdata
    useEffect(()=>{
        axios.get("home/swiperdata").then(res=>{
            // console.log(res);
            setSwiperData(res.message);
        })
    },[]);

    return (
        <div className={styles.Context}>
               <Swiper data={swiperData}></Swiper>
               <Classification></Classification>
               <Zu></Zu>
               <Housing></Housing>
               <Roomname></Roomname>
        </div>
    )
}

export default memo(Context)